<template>
  <div class="pop-up-child" v-if="showCurProduct">
    <header class="header">
      <p class="title" v-text="sheetTitle"></p>
      <div class="close" @click="close">
        <Iconfont iconClass="cha1"/>
      </div>
    </header>
    <div class="list-content" v-html="htmlConnect"></div>
    <!-- <p class="tip-text">{{tipText}}</p> -->
  </div>
</template>
<script>
export default {
  components: {
  },
  props:{
    roomInfo:String,//房间信息
    sheetTitle: String//标题
	},
  data() {
    return {
      showCurProduct: true,
      htmlConnect:'',
      tipText: "没有更多数据了",
    }
  },
  created () {
    this.getCurProductData();
  },
  methods: {
    close() {
      this.$emit("formChildMsg",{
        type: "footerActionSheetClose",
        data: ''
      })
    },
    getCurProductData() {
      this.$http.get('/h5live/getTableContent', {
        params: {
          roomId: this.roomInfo.roomInfo.roomId,//房间id
        }
      } )
      .then(res => {
        if(res.data.code == '000000'){
            this.tipText = ""
            this.htmlConnect = res.data.data.content
        }
      })
      .catch(response => {

        console.log(response);
      });
    },
  },
};
</script>
<style scoped>
.pop-up-child {
  width: 100%;
  min-height: 220px;
  background: #fff;
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1001;
  border-radius: 20px 20px 0px 0px;
}

.pop-up-child .header {
  line-height: 64px;
  text-align: center;
  position: relative;
}

.pop-up-child .title {
  font-size: 28px;
  font-weight: bold;
  color: #666666;
}

.pop-up-child .close {
  position: absolute;
  top: 0;
  right: 0;
}

.pop-up-child .iconcha1 {
  padding: 0 30px;
  font-size: 18px;
  color: #c8c9cc;
}

.list-content {
  width: 100%;
  padding: 0 30px 0;
  max-height: calc(56vh - 64px);
  overflow-y: scroll;
}

.tip-text {
  width: 100%;
  height: 80px;
  line-height: 80px;
  color: #999999;
  text-align: center;
  font-size: 26px;
  margin-top: 30px;
}

.list-content >>> img {
  display: block;
  width: 100%;
  height: auto;
}
</style>